﻿using System;
using System.Windows;

namespace Visuals
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void Application_Startup(object sender, StartupEventArgs e)
        {

        }

        protected override void OnStartup(StartupEventArgs e)
        {
            if (AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData != null &&
                AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData.Length > 0)
            {
                try
                {
                    string fname = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[0];
                    Uri uri = new Uri(fname);
                    fname = uri.LocalPath;
                    Properties["ProjectFilePath"] = fname;
                }
                catch (Exception ex)
                {
                }
            }
            base.OnStartup(e);
        }
    }
}
